<?php

return [
    /*
    |--------------------------------------------------------------------------
    | 微信配置
    |--------------------------------------------------------------------------
    |
    | 这里配置微信公众号相关的参数
    |
    */
    
    // 微信公众号配置
    'app_id' => env('WECHAT_APP_ID', 'wxba6d430072eb9640'),
    'app_secret' => env('WECHAT_APP_SECRET', 'b4e9c3a5f399a946ef1021cf9bc0c16b'),
    'token' => env('WECHAT_TOKEN', '62eKOmTqstPiuPzQDWfbrpKD1r1mbO6F'),
    'aes_key' => env('WECHAT_AES_KEY', '8GCc6CMvAYbHVtYaYyj8t6XzmMbloRtSBmlElzNrTt4'),
    
    // 微信支付配置
    'payment' => [
        'merchant_id' => env('WECHAT_PAYMENT_MERCHANT_ID', ''),
        'key' => env('WECHAT_PAYMENT_KEY', ''),
        'cert_path' => env('WECHAT_PAYMENT_CERT_PATH', ''),
        'key_path' => env('WECHAT_PAYMENT_KEY_PATH', ''),
    ],
    
    // 微信JS-SDK配置
    'js_sdk' => [
        'debug' => env('WECHAT_JS_SDK_DEBUG', false),
        'js_api_list' => [
            'updateAppMessageShareData',
            'updateTimelineShareData',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone',
            'getLocation',
            'chooseLocation',
            'scanQRCode',
            'chooseImage',
            'uploadImage',
            'downloadImage',
            'previewImage',
            'getNetworkType',
            'hideOptionMenu',
            'showOptionMenu',
            'hideMenuItems',
            'showMenuItems',
            'hideAllNonBaseMenuItem',
            'showAllNonBaseMenuItem',
            'closeWindow',
            'openLocation',
            'getLocation'
        ]
    ],
    
    // 微信授权配置
    'oauth' => [
        'scopes' => ['snsapi_base', 'snsapi_userinfo'],
        'callback' => env('WECHAT_OAUTH_CALLBACK', '/h5/wechat/callback'),
    ],
    
    // 微信菜单配置
    'menu' => [
        'button' => [
            [
                'type' => 'view',
                'name' => '换换猫商城',
                'url' => env('WECHAT_MENU_URL', 'https://yourdomain.com/h5/')
            ],
            [
                'type' => 'view',
                'name' => '商家入驻',
                'url' => env('WECHAT_MENU_MERCHANT_URL', 'https://yourdomain.com/h5/#/pages/onboarding/index')
            ],
            [
                'type' => 'view',
                'name' => '个人中心',
                'url' => env('WECHAT_MENU_USER_URL', 'https://yourdomain.com/h5/#/pages/member/index')
            ]
        ]
    ],
    
    // 微信模板消息配置
    'template' => [
        'merchant_approved' => env('WECHAT_TEMPLATE_MERCHANT_APPROVED', ''),
        'order_notification' => env('WECHAT_TEMPLATE_ORDER_NOTIFICATION', ''),
        'payment_success' => env('WECHAT_TEMPLATE_PAYMENT_SUCCESS', ''),
    ],
    
    // 微信客服配置
    'customer_service' => [
        'enabled' => env('WECHAT_CUSTOMER_SERVICE_ENABLED', false),
        'kf_account' => env('WECHAT_CUSTOMER_SERVICE_KF_ACCOUNT', ''),
    ],
    
    // 微信素材管理
    'material' => [
        'upload_path' => storage_path('app/wechat/material'),
        'max_size' => 2 * 1024 * 1024, // 2MB
        'allowed_types' => ['image', 'voice', 'video', 'thumb'],
    ],
    
    // 微信数据统计
    'analytics' => [
        'enabled' => env('WECHAT_ANALYTICS_ENABLED', false),
        'app_id' => env('WECHAT_ANALYTICS_APP_ID', ''),
    ],
];
